<%--
    Document   : employer_registration
    Created on : Apr 1, 2012, 2:31:56 AM
    Author     : Ajay kumar "mukund"
--%>

<%@page import="java.sql.*"%>
<%@page import="jobportal.Dbconn"%>
<%@page import="java.util.Random"%>
<script>
    $(document).ready(function(){
        $("#collegergister").validationEngine();
        
        $('#state').change(function(e){
            $this = $(e.target);
        
            $.ajax({
                type: "POST",
                url: "src/loadcity.jsp", 
                data: "state="+$this.val(),
                success:function(data){
                    $('#city').html(data);
                }
            });
        });
 
    });
</script>
<%
    String dest = "", captcha = "";
    if (session.getAttribute("role") != null && session.getAttribute("role").equals("admin")) {
        dest = "../";

    }
    Connection con = Dbconn.getConn();
    Statement st = con.createStatement();
    ResultSet rs = st.executeQuery("select distinct state from dist ");
%>
<table border="0" cellspacing="0" cellpadding="0" style=" height:auto;">
    <tbody>
        <tr>
            <td width="651" align="left" valign="top" style="padding-left:25px;">
                <form name="collegeregister" action="<%=dest%>CollegeRegister" id="collegergister" method="get"  >
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tbody><tr>
                                <td height="30" valign="bottom" style="padding-top:10px;"><div align="left" class="mainheading" style="padding-bottom:10px;">New College Registration</div><div class="heading_line_hor"><!-- --></div>
                                </td>
                            </tr>
                            <tr>
                                <td align="left"><div align="left" style="padding-top:10px;">Colleges can register in this  Recruitment portal.The Students of that College can register through college details.The student profile will be verified by the TPO of the concerned college..
                                        <%
                                            if (session.getAttribute("username") == null) {
                                        %>
                                        <a title="alink" href="college.jsp" class="link">&nbsp;Click Here</a>  to login.
                                        <%}%>
                                    </div>

                                </td>
                            </tr>
                            <tr>
                                <td align="center" class="messagesred">
                                </td>
                            </tr>
                            <tr>
                                <td align="center">
                                    <div align="right" style="padding-right:20px;"><span class="messagesred">*</span>Fields are mandatory</div></td>
                            </tr>
                        </tbody></table>
                    <img src="./company Registration_files/blank.gif" width="1" height="15">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-left:20px;">
                        <tbody><tr>
                                <td colspan="4"></td>
                            </tr>
                            <tr>
                                <td colspan="4"></td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <strong>Login Information</strong><div class="line_spacer1"><!-- --></div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" rowspan="2" valign="top" style="padding-left:5px; width:200px;"><span class="messagesred">*</span> College id</td>
                                <td width="373" height="28" colspan="4" valign="middle">
                                    <input id="clgid" size="25" name="clgid" class="validate[required]" value="" >
                                    &nbsp; <span id="check_uname_div"></span>
                                    <div id="checkuserbox"></div></td>
                            </tr>
                            <tr>
                                <td height="22" colspan="4" valign="middle"><p>Note: Please enter correct college id</p></td>
                            </tr>

                            <%if (session.getAttribute("username") == null) {%>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Password </p></td>
                                <td height="28" colspan="4" align="left" valign="middle">
                                    <input name="password" type="password" id="password" size="25" value="" class="validate[required,minSize[6]]">
                                </td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" align="left" valign="middle" style="padding-left:5px;"><p><span class="messagesred">*</span> Confirm Password </p></td>
                                <td height="28" colspan="4" align="left" valign="middle">
                                    <input name="password1" type="password" id="cpass" size="25" value="" class="validate[required,equals[password]]">
                                </td>
                            </tr>

                            <%} else {

                                Random rd = new Random();
                                long l = rd.nextLong();
                                if (l < 0) {
                                    l *= -1;
                                }
                            %>
                            <tr>
                                <td colspan="2">
                                    <input name="password" type="hidden" value="<%=l%>"/>
                                </td>
                            </tr>
                            <%                                        }
                            %>



                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> TPO Name </p></td>
                                <td colspan="4" align="left" valign="middle"><input id="tponame" size="25" name="tponame" value="" class="validate[required],custom[onlyLetterSp]"></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span>Email</p></td>
                                <td colspan="4" align="left" valign="middle"><input id="tpoemail" size="25" name="tpoemail" value="" class="validate[required],custom[email]"  ></td>
                            </tr>

                            <tr>
                                <td height="28" colspan="3" style="padding-left:5px;"><strong>College Information:</strong> <div class="line_spacer1"><!-- --></div></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> College Name</p></td>
                                <td colspan="4" align="left" valign="middle"><input id="cllgname" size="25" name="cllgname" value="" class="validate[required],custom[onlyLetterSp]"></td>
                            </tr>
                            <tr>
                                <td valign="top" colspan="2" style="padding-left:5px;"><p><span class="messagesred">*</span> College Address</p></td>
                                <td colspan="4" align="left" valign="middle"><textarea name="address" cols="40" rows="4" id="address" class="validate[required]"></textarea></td>
                            </tr>

                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><span class="messagesred">*</span> State</td>
                                <td align="left" valign="middle"><div id="txtHint1">
                                        <select name="state" id="state" style="width: 200px;" class="validate[required],listmenu">
                                            <%
                                                while (rs.next()) {
                                                    out.println("<option value=\"" + rs.getString(1) + "\">" + rs.getString(1) + "</option>");
                                                }
                                            %>
                                        </select>
                                    </div>                                    </td>
                            </tr>
                            <tr>
                                <td height="60" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> City </p></td>
                                <td align="left" valign="middle"><div id="txtHint1">
                                        <select name="city" id="city" style="width: 200px;" class="validate[required],listmenu">
                                            <option value="">Select City</option>

                                        </select>
                                    </div>                                    </td>
                            </tr>

                            <tr>
                                <td width="257" valign="top" style="padding-left:5px;"><span class="messagesred" >*</span> College Profile </td>
                                <td colspan="4" align="left" valign="middle"><textarea id="wysiwyg" name="clgprofile" cols="50" rows="15" class="validate[required]" style="width:90%"></textarea></td>
                            </tr>



                            <tr>
                                <td valign="top">&nbsp;</td>
                                <td colspan="4" align="left" valign="middle">&nbsp;</td>
                            </tr>
                            <tr>
                                <td height="28" colspan="4" valign="top" style="padding-left:5px;"><strong>Contact Numbers</strong>
                                    <div class="line_spacer1"><!-- --></div></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><span class="messagesred">*</span> Office</td>
                                <td colspan="4" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tbody><tr>
                                                <td><input name="contact" id="contact" size="25"  value="" class="validate[required,minSize[10],maxSize[11]],custom[phone]"></td>
                                            </tr>
                                        </tbody></table></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:15px;"><p>Fax </p></td>
                                <td colspan="4" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tbody><tr>
                                                <td><input name="fax" id="fax" size="25"  value="" class="validate[required,minSize[10],maxSize[11]],custom[phone]"></td>
                                            </tr>
                                        </tbody></table></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Mobile </p></td>
                                <td colspan="4" align="left" valign="middle"><input name="mobile" id="mobile" size="25"  value="" class="validate[required,minSize[10],maxSize[10]],custom[phone]">
                                    &nbsp; <span id="check_mobile_div"></span></td>
                            </tr>
                            <tr>
                                <td colspan="4" valign="top">&nbsp;</td>
                            </tr>
                            <tr>
                                <td colspan="3" style="padding-left:5px;"><strong>Additional Information:</strong><div class="line_spacer1"><!-- --></div></td>
                            </tr>

                            <tr>
                                <td height="34" valign="top" style="padding-left:5px;">University Name</td>
                                <td colspan="4" align="left" valign="middle"><label>
                                        <input type="text" name="uname" id="uname" size="25" class="validate[required],custom[onlyLetterSp]" />
                                    </label></td>
                            </tr>
                            <tr>
                                <td height="34" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span>Website URL </p></td>
                                <td colspan="4" align="left" valign="middle"><input name="url" id="url" size="40" maxlength="100" value="" class="validate[required],custom[url]">
                                    (http://www.abc.com)</td>
                            </tr>

                            <tr>
                                <td height="37" valign="middle" style="padding-left:5px;"><span> Verification Code</span></td>
                                <td colspan="4" align="left" valign="middle"><input name="code" id="captcha" class="validate[required]" type="text" >
                                    <img src="<%=dest%>Captcha" >
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td colspan="3"><input type="checkbox" checked="checked" value="true" id="in_resume_1_termsconditions"  name="in_resume_1_termsconditions" class="validate[required],checked">      I have read the  <span class="link"><a href="terms.jsp" target="_blank"><font color='#660000'>Terms   and Conditions</font> </a></span>and agree to be bound by them.          </td>
                            </tr>
                            <tr>
                                <td colspan="4" align="center" valign="middle" height="2"></td>
                            </tr>
                            <tr>
                                <td colspan="4" align="center" valign="middle" height="10px"><% if (request.getAttribute("status") != null) {%>

                                    <%=request.getAttribute("status")%>

                                    <%}%></td>
                            </tr>
                            <tr>
                                <td height="28"  valign="top" style="padding-left:5px;">&nbsp;</td>

                            </tr>
                        </tbody></table>
                    <div style="padding-left:220px; padding-top:10px; padding-bottom:10px;"><input name="Submit" type="submit" value="Register" class="button2" style="height:40; width:90">&nbsp;&nbsp;</div>

                </form>
            </td>

        </tr>




    </tbody>
</table>
